/**
 * 财务模块
 */
import { service, paramsQuery } from './request';

// 账户名称、登录账户、公司名称下拉
export function fetchFinancialSelect() {
  let ret = paramsQuery('/manage/api/bus/financial/search_list');
  return service.post(ret.path, ret.body);
}

// 转账管理/列表
export function fetchFinancialTransferList(param) {
  let ret = paramsQuery('/manage/api/bus/financial/getmglist', param);
  return service.post(ret.path, ret.body);
}

// 转账管理/充值
export function fetchFinancialTransferPay(param) {
  let ret = paramsQuery('/manage/api/bus/financial/top_up', param);
  return service.post(ret.path, ret.body);
}

// 转账管理/转出
export function fetchFinancialTransferPayment(param) {
  let ret = paramsQuery('/manage/api/bus/financial/roll_out', param);
  return service.post(ret.path, ret.body);
}

// 转账管理/转出信息查询
export function fetchFinancialTransferPaymentDetail(param) {
  let ret = paramsQuery('/manage/api/bus/financial/getremain', param);
  return service.post(ret.path, ret.body);
}

// 转账管理/暂停所有广告
export function fetchFinancialTransferPauser(param) {
  let ret = paramsQuery('/manage/api/bus/financial/close_plan', param);
  return service.post(ret.path, ret.body);
}

// 转账明细/列表
export function fetchFinancialTransferDetailList(param) {
  let ret = paramsQuery('/manage/api/bus/financial/transfer_list', param);
  return service.post(ret.path, ret.body);
}

// ADX消耗管理/列表
export function fetchFinancialAdxConsumeList(param) {
  let ret = paramsQuery('/manage/api/bus/financial/adx_consume_list', param);
  return service.post(ret.path, ret.body);
}

// ADX消耗管理/导入
export function fetchFinancialAdxConsumeUpload(param) {
  let ret = paramsQuery('/manage/api/bus/financial/uploadflie', param);
  return service.post(ret.path, ret.body);
}

// 累计消耗
export function fetchFinancialSumCost(param) {
  let ret = paramsQuery('/manage/api/bus/financial/get_historical_cost', param);
  return service.post(ret.path, ret.body);
}

// 交易明细
export function fetchFinancialTradingList(param) {
  let ret = paramsQuery('/manage/api/bus/financial/get_transaction_details', param);
  return service.post(ret.path, ret.body);
}
